﻿@model Core.Models.Post
@using System.Web.Mvc;
@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout_Admin2.cshtml";
    var content = Server.HtmlDecode(Model.Content);
}
<div class="panel panel-success">
    <div class="panel-heading">
        <h2 class="panel-title">
            @Html.DisplayFor(model => model.Title)</h2>
    </div>
    <div class="panel-body">
        <div class="panel-body-createddate">
            @Html.DisplayFor(model => model.CreatedDate)
        </div>
        <div class="panel-body-content">
            @*@Html.Raw(Model.Content)*@
            @Html.Raw(content)
        </div>
        <div id="comment_entries">
            @*@Html.Partial("_ViewComments", Model.Comments)*@
            @{ Html.RenderAction("ViewComments", "Comment", new { postId = Model.Id, isAuthorized = true }); }
        </div>
        <div class="panel-body-actionlink">
            @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
             @Html.ActionLink("Delete", "Delete", new { id = Model.Id })
        </div>
    </div>
</div>
